<?php

{{ builderInfo.php|raw }}

namespace {{ appNamespace }}\Models;

class User extends \ADIOS\Models\User {
  public function columns(array $columns = []): array
  {
    return parent::columns(array_merge($columns, [
      'name' => [
        'type' => 'varchar',
        'title' => $this->translate('Given name'),
        'viewParams' => [
          'Table' => [
            'show' => true
          ],
          'Form' => [
            'show' => true
          ],
        ],
      ],
      'surname' => [
        'type' => 'varchar',
        'title' => $this->translate('Family name')
      ],
      'email' => [
        'type' => 'varchar',
        'title' => $this->translate('Email'),
        'show' => false
      ],
      'phone_number' => [
        'type' => 'varchar',
        'title' => $this->translate('Phone number'),
        'show' => false
      ],
      'photo' => [
        'type' => 'image',
        'title' => $this->translate('Photo'),
        'only_upload' => 'yes',
        'subdir' => 'users/',
        "description" => $this->translate("Supported image extensions: jpg, gif, png, jpeg"),
      ],
    ]));
  }

}
